import request from '@/utils/request'

export function listYg(query) {
  return request({
    url: '/staff/list',
    method: 'get',
    params: query
  })
}

export function deleteYg(data) {
  return request({
    url: '/staff/delete',
    method: 'post',
    data
  })
}

export function publishYg(data) {
  return request({
    url: '/staff/create',
    method: 'post',
    data
  })
}

export function detailYg(id) {
  return request({
    url: '/staff/detail',
    method: 'get',
    params: { id }
  })
}

export function editYg(data) {
  return request({
    url: '/staff/update',
    method: 'post',
    data
  })
}

export function listCatAndBrand() {
  return request({
    url: '/staff/catAndBrand',
    method: 'get'
  })
}
